#region Copyright
/// <copyright>
/// Copyright (c) 2008 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Runtime.InteropServices;
using System.Text;

namespace Osh.Configuration
{
	public interface IMediaLibraryElement : IConfigurationElement
	{
		string Name { get; set; }
		string Type { get; set; }
		string InitializeData { get; set; }
	}

	[ClassInterface(ClassInterfaceType.None)]
	public class MediaLibraryElement : ConfigurationElement, IMediaLibraryElement
	{
		public MediaLibraryElement()
		{
		}

		public MediaLibraryElement(string name, string type, string initializeData)
		{
			this.Name = name;
			this.Type = type;
			this.InitializeData = initializeData;
		}

		[ConfigurationProperty("name", IsRequired = true, IsKey = true)]
		public string Name
		{
			get { return (string)this["name"]; }
			set { this["name"] = value; }
		}
		
		[ConfigurationProperty("type", IsRequired=true)]
		public string Type
		{
			get { return (string)this["type"]; }
			set { this["type"] = value; }
		}

		[ConfigurationProperty("initializeData", DefaultValue = null, IsRequired = false)]
		public string InitializeData
		{
			get { return (string)this["initializeData"]; }
			set { this["initializeData"] = value; }
		}
	}
}
